package com.liuxinlong.common;

import com.liuxinlong.enums.ReturnCodes;

public class AosException extends RuntimeException {
	private String errorCode;
	private String errorMsg;

	public AosException(String errorCode, String errorMsg) {
		this.errorCode = errorCode;
		this.errorMsg = errorMsg;
	}

	public String getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(String errorCode) {
		this.errorCode = errorCode;
	}

	public String getErrorMsg() {
		return errorMsg;
	}

	public void setErrorMsg(String errorMsg) {
		this.errorMsg = errorMsg;
	}

	public AosException(ReturnCodes returnCodes) {
		this.errorCode = returnCodes.getRetCode();
		this.errorMsg = returnCodes.getMsg();
	}

	public AosException(ReturnCodes returnCodes, String msg) {
		this.errorCode = returnCodes.getRetCode();
		this.errorMsg = msg;
	}
}
